package com.societyGames.catExercises
{
import com.societyGames.action.ActionQueue;

public class CatSimulation
{
  private var _render:CatRender;
  private var _catCount:int;
  private var _batCount:int;
  private var _hatCount:int;
  private var _mittenCount:int;

  public function CatSimulation(actionQueue:ActionQueue)
  {
    this._render = new CatRender(this, actionQueue);
  }

  public function get render():CatRender
  {
    return this._render;
  }

  public function get catCount():int
  {
    return this._catCount;
  }

  public function get hatCount():int
  {
    return this._hatCount;
  }

  public function get mittenCount():int
  {
    return this._mittenCount;
  }

  public function get batCount():int
  {
    return this._batCount;
  }

  public function initialize(catCount:int, batCount:int):void
  {
    this._catCount = catCount;
    this._batCount = batCount;
    this._hatCount = 0;
    this._mittenCount = 0;
    this._render.initialize(catCount, batCount);
  }

  public function buyHats(count:int):void
  {
    this._hatCount += count;
    this._render.buyHats(count);
  }

  public function buyMittens(count:int):void
  {
    this._mittenCount += count;
    this._render.buyMittens(count);
  }
}
}